

using System;
using System.Text;

using NHibernate;
using NHibernate.Cfg;
using NHibernate.Criterion;
using NHibernate.Exceptions;

using LastFMGenNHibernate.EN.LastFM;
using LastFMGenNHibernate.CAD.LastFM;

namespace LastFMGenNHibernate.CEN.LastFM
{
        public partial class EventoCEN
        {
        private IEventoCAD _IEventoCAD;

        public EventoCEN(IEventoCAD _IEventoCAD)
        {
                this._IEventoCAD = _IEventoCAD;
        }

        public int New_ (int p_id, String p_nombre, String p_descripcion)
        {
                EventoEN eventoEN = null;
                int oid;

                //Initialized EventoEN
                eventoEN = new EventoEN ();
                eventoEN.Id = p_id;
                eventoEN.Nombre = p_nombre;
                eventoEN.Descripcion = p_descripcion;
                //Call to EventoCAD

                oid = _IEventoCAD.New_ (eventoEN);
                return oid;
        }

        public System.Collections.Generic.IList<EventoEN> DevolverEventos (int first, int size)
        {
                System.Collections.Generic.IList<EventoEN> list = null;

                list = _IEventoCAD.DevolverEventos (first, size);
                return list;
        }
        public void Modify (int p_Evento_OID, String p_nombre, String p_descripcion)
        {
                EventoEN eventoEN = null;

                //Initialized EventoEN
                eventoEN = new EventoEN ();
                eventoEN.Id = p_Evento_OID;
                eventoEN.Nombre = p_nombre;
                eventoEN.Descripcion = p_descripcion;
                //Call to EventoCAD

                _IEventoCAD.Modify (eventoEN);
        }
        }
}
